/***********************************************************************************
Function : 自由通讯-自由格式串口发送函数
devId : 自由格式设备标识
buf : 数据缓冲区(长度应该与实际数据长度匹配)
len : 数据缓冲区长度(字节数)
Return : -1/大于等于0(执行失败/实际发送长度)
************************************************************************************/_T
int COMSend(int devId, char* buf, int len);
实例:
int result = -1;
char data[256] = {0};
//发送100个字符
result = COMSend(_T("自由格式"), data, 100);